<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>1.4.6案例交换两个变量的值</title>
    <script>
        var temp;
        var apple01 = '青苹果在上';
        var apple02 = '红苹果在下';
        temp = apple01;
        apple01 = apple02;
        apple02 = temp;
        console.log(apple01);
        console.log(apple02);
    </script>
</head>

<body>

</body>

</html>